package com.example.leave.form;

import com.example.leave.component.valid.NotBefore;
import com.example.leave.pojo.Time;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.sql.Date;

@Data
public class StartEndDateTimeForm {
    @NotNull(message = "startDate不能为空")
    @NotBefore(message = "startDate不能是今天之前的日期")
    private Date startDate;
    @NotNull(message = "endDate不能为空")
    @NotBefore(message = "endDate不能是今天之前的日期")
    private Date endDate;
    @NotNull(message = "startTime不能为空")
    @Valid
    private Time startTime;
    @NotNull(message = "endTime不能为空")
    @Valid
    private Time endTime;
}
